***SUMMARY STATISTICS***

version 15.1

clear
use "worms_replication.dta"
set more off


***Number of diocese, covered and uncovered***
	
count if diocese_count == 1
count if diocese_count == 1 & covered == 1
count if diocese_count == 1 & covered == 0


***Total number of bishop-diocese pairs***
count if byearin == year 

**Bishop-Diocese pairs by covered vs uncovered***
count if byearin == year  & covered == 1
sum covered if  byearin == year

***Bishop-diocese pairs with alignment observed***
count if byearin == year & religious_bishop != .

***Bishop-Diocese pairs with alignment observed by covered***
count if byearin == year & religious_bishop != . & covered == 1
count if byearin == year & religious_bishop != . & covered == 0
sum covered if byearin == year & religious_bishop != .

**Bishop-Diocese pairs by alignment***
count if byearin == year  & religious_bishop == 1
count if byearin == year  & religious_bishop == 0
sum religious_bishop if byearin == year


***How many diocese are on a trade route vs not on a trade route prior to the Concordats***
count if trade_fixed == 1 & diocese_count == 1
count if trade_fixed == 0 & diocese_count == 1
sum trade_fixed if diocese_count == 1


***How often do we know the monarch when we know the bishop's a;ignment
count if byearin==year & religious_bishop!=. & monarch_id != .


***Raw comparison of diocese with and without trade with and without concordats, pooling covered and uncovered***
sum religious_bishop if  trade_fixed==1 &  Concordats==0
sum religious_bishop if trade_fixed == 0 & Concordats==0
sum religious_bishop if  trade_fixed==1 & Concordats==1
sum religious_bishop if trade_fixed == 0 &  Concordats==1
